<template>
  <div class="custom-control custom-switch">
    <input
      type="checkbox"
      class="custom-control-input"
      :id="dataId"
      :checked="checked"
      @change="$emit('change',$event.target.checked)"
    />
    <label :for="dataId" class="custom-control-label"></label>
  </div>
</template>

<script>
export default {
  name: "CustomSwitch",
  model: {
    prop: "checked",
    event: "change"
  },
  props: {
    checked: {
      default: false
    },
    dataId: {
      default: ""
    }
  }
};
</script>